package com.jay.relationships.transfer;

public class HealthTask {
    private String taskName;
    private Integer initialHealPoint;

    public HealthTask( String taskName, Integer initialHealPoint) {
        this.taskName = taskName;
        this.initialHealPoint = initialHealPoint;
    }

    public Integer calculateHealthPointForTask(HealthLevelHandler handler){
        //计算该任务所能获取的积分，需要健康等级信息。健康登记越低积分越高，以鼓励用户多做任务
        Integer healthPointFromHealthLevel = 12 / handler.getHealthLevel();
        //最终积分为初始积分 + 与健康等级相关的几人
        return initialHealPoint + healthPointFromHealthLevel;
    }


}
